package ma.cdm.compteRendu.bo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ResponsablepointId entity. @author Limouri Anouar
 */
@Embeddable
public class ResponsablepointId  implements java.io.Serializable  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4158014650510005018L;
	// Fields
	
	private String idresponsable;
	private Long iddetailpoint;
	
	// Constructors

    /** default constructor */
	public ResponsablepointId() {
		super();
	}
	
	/** full constructor */
	public ResponsablepointId(String idresponsable, Long iddetailpoint) {
		super();
		this.idresponsable = idresponsable;
		this.iddetailpoint = iddetailpoint;
	}

	@Column(name = "IDRESPONSABLE", unique = true, nullable = false, length = 100)
	public String getIdresponsable() {
		return this.idresponsable;
	}

	public void setIdresponsable(String idresponsable) {
		this.idresponsable = idresponsable;
	}
	@Column(name = "IDDETAILPOINT", unique = true, nullable = false, length = 100)
	public Long getIddetailpoint() {
		return iddetailpoint;
	}

	public void setIddetailpoint(Long iddetailpoint) {
		this.iddetailpoint = iddetailpoint;
	}
	
	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ResponsablepointId))
			return false;
		ResponsablepointId castOther = (ResponsablepointId) other;

		return ((this.getIdresponsable()) == castOther.getIdresponsable()) || (this
				.getIdresponsable() != null
				&& castOther.getIdresponsable() != null && this
				.getIdresponsable().equals(castOther.getIdresponsable()))
				&& ((this.getIddetailpoint() == castOther
						.getIddetailpoint()) || (this
						.getIddetailpoint() != null
						&& castOther.getIddetailpoint() != null && this
						.getIddetailpoint().equals(
								castOther.getIddetailpoint())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getIdresponsable() == null ? 0 : this.getIdresponsable()
						.hashCode());
		result = 37
				* result
				+ (getIddetailpoint() == null ? 0 : this
						.getIddetailpoint().hashCode());
		return result;
	}
}
